﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace QYmall.Core.Model.Models
{
    /// <summary>
    /// 会员组价格
    /// </summary>
    public class ShopGoodsGroupPrice
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        /// <summary>
        /// 所属组别
        /// </summary>
        [Display(Name = "所属组别")]
        public int GroupId { get; set; }

        /// <summary>
        /// 所属货品
        /// </summary>
        [Display(Name = "所属货品")]
        [ForeignKey("GoodsProduct")]
        public long ProductId { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        [Display(Name = "金额")]
        [Column(TypeName = "decimal(18, 2)")]
        public decimal Price { get; set; } = 0;

        /// <summary>
        /// 商品货品
        /// </summary>
        public ShopGoodsProduct? GoodsProduct { get; set; }
    }
}
